package com.demo.kettle.controller;

import com.demo.kettle.req.KettleReq;
import com.demo.kettle.service.IKettleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Kettle 文件执行测试
 *
 * @author yuanzheng
 * @since 2022-022-28
 */
@RestController
@RequestMapping(value = "/kettle")
@Slf4j
public class KettleController {

    @Resource
    private IKettleService kettleTestService;

    @PostMapping(value = {"/job"})
    public String job(@RequestBody KettleReq kettleReq) {
        return kettleTestService.job(kettleReq);
    }

    @PostMapping(value = {"/trans"})
    public String trans(@RequestBody KettleReq kettleReq) {
        return kettleTestService.trans(kettleReq);
    }

}

